package com.ruoyi.backend.service.impl.orderManagementImpl;

import com.ruoyi.backend.domain.orderManagement.ServiceReview;
import com.ruoyi.backend.mapper.orderManagement.ServiceReviewMapper2;
import com.ruoyi.backend.service.orderManagement.IServiceReviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 评价管理Service业务层处理
 *
 * @author 王冰冰
 * @date 2025-03-19
 */
@Service
public class ServiceReviewService2Impl implements IServiceReviewService {
    @Autowired
    private ServiceReviewMapper2 serviceReviewMapper2;

    /**
     * 查询评价管理
     *
     * @param reviewId 评价管理主键
     * @return 评价管理
     */
    @Override
    public ServiceReview selectServiceReviewByReviewId(Long reviewId) {
        return serviceReviewMapper2.selectServiceReviewByReviewId(reviewId);
    }

    /**
     * 查询评价管理列表
     *
     * @param serviceReview 评价管理
     * @return 评价管理
     */
    @Override
    public List<ServiceReview> selectServiceReviewList(ServiceReview serviceReview) {
        return serviceReviewMapper2.selectServiceReviewList(serviceReview);
    }

    /**
     * 新增评价管理
     *
     * @param serviceReview 评价管理
     * @return 结果
     */
    @Override
    public int insertServiceReview(ServiceReview serviceReview) {
        return serviceReviewMapper2.insertServiceReview(serviceReview);
    }

    /**
     * 修改评价管理
     *
     * @param serviceReview 评价管理
     * @return 结果
     */
    @Override
    public int updateServiceReview(ServiceReview serviceReview) {
        return serviceReviewMapper2.updateServiceReview(serviceReview);
    }

    /**
     * 批量删除评价管理
     *
     * @param reviewIds 需要删除的评价管理主键
     * @return 结果
     */
    @Override
    public int deleteServiceReviewByReviewIds(Long[] reviewIds) {
        return serviceReviewMapper2.deleteServiceReviewByReviewIds(reviewIds);
    }

    /**
     * 删除评价管理信息
     *
     * @param reviewId 评价管理主键
     * @return 结果
     */
    @Override
    public int deleteServiceReviewByReviewId(Long reviewId) {
        return serviceReviewMapper2.deleteServiceReviewByReviewId(reviewId);
    }
}